from rest_framework import serializers


class CandidateSerializer(serializers.Serializer):
    id = serializers.IntegerField(read_only=True)
    name = serializers.CharField(max_length=100)
    email = serializers.EmailField()
    phone = serializers.CharField(max_length=20, allow_blank=True, required=False)


class InterviewSerializer(serializers.Serializer):
    id = serializers.IntegerField(read_only=True)
    candidate_id = serializers.IntegerField()
    scheduled_at = serializers.CharField()  # ISO string in prototype
    interviewer = serializers.CharField(max_length=100)
    location = serializers.CharField(max_length=200, allow_blank=True, required=False)
    result = serializers.CharField(max_length=50, allow_blank=True, required=False)
    feedback = serializers.CharField(allow_blank=True, required=False)
